package net.wofly.cashier.order.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.cashier.order.repository.CashierOrderContentRepository;
import net.wofly.cashier.order.domain.OrderContent;
import net.wofly.cashier.order.service.ICashierOrderContentService;

@Service("iCashierOrderContentService")
@Transactional
public class CashierOrderContentServiceImpl implements ICashierOrderContentService {

	@Autowired
	CashierOrderContentRepository cashierOrderContentRepository;

	@Override
	public OrderContent save(OrderContent entity) {
		return cashierOrderContentRepository.save(entity);
	}

	@Override
	public void delete(OrderContent entity) {
		cashierOrderContentRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		cashierOrderContentRepository.delete(key);
	}

	@Override
	public OrderContent findOne(String key) {
		return cashierOrderContentRepository.findOne(key);
	}

	@Override
	public List<OrderContent> save(List<OrderContent> entityList) {
		return (List<OrderContent>) cashierOrderContentRepository.save(entityList);
	}
}
